package net.zjitc.doubao_community_backed.exception;/**
 * @Author 董熠涛
 * @Date 2025/6/16  19:14
 */

import net.zjitc.doubao_community_backed.api.IErrorCode;

/**
 * @Author:董熠涛
 * @ 2025/6/1619:14
 */
public class ApiException extends RuntimeException{
    private IErrorCode errorCode;

    public ApiException(IErrorCode errorCode) {
        super(errorCode.getMessage());
        this.errorCode = errorCode;
    }

    public ApiException(String message) {
        super(message);
    }

    public IErrorCode getErrorCode() {
        return errorCode;
    }
}
